<template>
    <div class="view-container">
        <p>申请当事人</p>
        <el-form label-width="120px">
            <el-form-item label="名字">
                <el-col :span="6" :offset="0">
                    <el-input v-model="name" disabled />
                </el-col>
            </el-form-item>
            <el-form-item label="开始时间">
                <el-date-picker v-model="start_time" type="date" placeholder="Pick a day" format="YYYY-MM-DD"
                    value-format="YYYY-MM-DD" 
                    
                    />
            </el-form-item>
            <el-form-item label="结束时间">
                <el-date-picker v-model="end_time" type="date" placeholder="Pick a day" format="YYYY-MM-DD"
                    value-format="YYYY-MM-DD" />
            </el-form-item>

        </el-form>
        <el-button type="success" @click="ApplyFor()">申请</el-button>
    </div>
</template>
<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'
import {ApplyForParty} from '../../../service/Party'

const name = localStorage.getItem('User')
const start_time = ref('')
const end_time = ref('')

//*申请当事人
function ApplyFor()
{
    const data = {name:name,start_time:start_time.value,end_time:end_time.value}
    ApplyForParty(data)
}

</script>
<style></style>